package com.sangharsh.core.algo;

import com.sangharsh.core.algo.base.Color;
import com.sangharsh.core.algo.base.Mode;

public class Journey {

	private Vertex destination;
	private Vertex source;
	private Color colorCode;
	private Mode mode;

	public Journey(Vertex source, Vertex destination, Mode mode, Color colorCode) {
		this.source = source;
		this.destination = destination;
		this.mode = mode;
		this.colorCode = colorCode;
	}

	public Vertex getDestination() {
		return destination;
	}

	public void setSource(Vertex source) {
		this.source = source;
	}

	public Vertex getSource() {
		return source;
	}

	public Color getColorCode() {
		return colorCode;
	}

	public Mode getMode() {
		return mode;
	}

	public String toString(){
		return source.getCode()+"-->"+destination.getCode() +"["+colorCode.toString()+"]";
	}

	public void setDestination(Vertex destination) {
		this.destination = destination;
		
	}
	
	public boolean isMetroJourney(){
		return mode.equals(Mode.METRO);
	}
	public boolean isBusJourney(){
		return mode.equals(Mode.BUS);
	}
	public boolean isWalkJourney(){
		return mode.equals(Mode.WALK);
	}
}
